Optimal. Leaf size=90 \[ \frac {1}{2} \sqrt {a+b \tan ^4(x)}-\frac {1}{2} \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{2} \sqrt {a+b} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.467, Rules used = {3670, 1248, 735, 844, 217, 206, 725} \[ \frac {1}{2} \sqrt {a+b \tan ^4(x)}-\frac {1}{2} \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{2} \sqrt {a+b} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 217
Rule 725
Rule 735
Rule 844
Rule 1248
Rule 3670
Rubi steps
\begin {align*} \int \tan (x) \sqrt {a+b \tan ^4(x)} \, dx &=\operatorname {Subst}\left (\int \frac {x \sqrt {a+b x^4}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {\sqrt {a+b x^2}}{1+x} \, dx,x,\tan ^2(x)\right )\\ &=\frac {1}{2} \sqrt {a+b \tan ^4(x)}+\frac {1}{2} \operatorname {Subst}\left (\int \frac {a-b x}{(1+x) \sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )\\ &=\frac {1}{2} \sqrt {a+b \tan ^4(x)}-\frac {1}{2} b \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )+\frac {1}{2} (a+b) \operatorname {Subst}\left (\int \frac {1}{(1+x) \sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )\\ &=\frac {1}{2} \sqrt {a+b \tan ^4(x)}+\frac {1}{2} (-a-b) \operatorname {Subst}\left (\int \frac {1}{a+b-x^2} \, dx,x,\frac {a-b \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{2} b \operatorname {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {\tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )\\ &=-\frac {1}{2} \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {1}{2} \sqrt {a+b} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{2} \sqrt {a+b \tan ^4(x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 86, normalized size = 0.96 \[ \frac {1}{2} \left (\sqrt {a+b \tan ^4(x)}-\sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )-\sqrt {a+b} \tanh ^{-1}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.66, size = 475, normalized size = 5.28 \[ \left [\frac {1}{4} \, \sqrt {b} \log \left (-2 \, b \tan \relax (x)^{4} + 2 \, \sqrt {b \tan \relax (x)^{4} + a} \sqrt {b} \tan \relax (x)^{2} - a\right ) + \frac {1}{4} \, \sqrt {a + b} \log \left (\frac {{\left (a b + 2 \, b^{2}\right )} \tan \relax (x)^{4} - 2 \, a b \tan \relax (x)^{2} + 2 \, \sqrt {b \tan \relax (x)^{4} + a} {\left (b \tan \relax (x)^{2} - a\right )} \sqrt {a + b} + 2 \, a^{2} + a b}{\tan \relax (x)^{4} + 2 \, \tan \relax (x)^{2} + 1}\right ) + \frac {1}{2} \, \sqrt {b \tan \relax (x)^{4} + a}, \frac {1}{2} \, \sqrt {-b} \arctan \left (\frac {\sqrt {b \tan \relax (x)^{4} + a} \sqrt {-b}}{b \tan \relax (x)^{2}}\right ) + \frac {1}{4} \, \sqrt {a + b} \log \left (\frac {{\left (a b + 2 \, b^{2}\right )} \tan \relax (x)^{4} - 2 \, a b \tan \relax (x)^{2} + 2 \, \sqrt {b \tan \relax (x)^{4} + a} {\left (b \tan \relax (x)^{2} - a\right )} \sqrt {a + b} + 2 \, a^{2} + a b}{\tan \relax (x)^{4} + 2 \, \tan \relax (x)^{2} + 1}\right ) + \frac {1}{2} \, \sqrt {b \tan \relax (x)^{4} + a}, -\frac {1}{2} \, \sqrt {-a - b} \arctan \left (\frac {\sqrt {b \tan \relax (x)^{4} + a} {\left (b \tan \relax (x)^{2} - a\right )} \sqrt {-a - b}}{{\left (a b + b^{2}\right )} \tan \relax (x)^{4} + a^{2} + a b}\right ) + \frac {1}{4} \, \sqrt {b} \log \left (-2 \, b \tan \relax (x)^{4} + 2 \, \sqrt {b \tan \relax (x)^{4} + a} \sqrt {b} \tan \relax (x)^{2} - a\right ) + \frac {1}{2} \, \sqrt {b \tan \relax (x)^{4} + a}, -\frac {1}{2} \, \sqrt {-a - b} \arctan \left (\frac {\sqrt {b \tan \relax (x)^{4} + a} {\left (b \tan \relax (x)^{2} - a\right )} \sqrt {-a - b}}{{\left (a b + b^{2}\right )} \tan \relax (x)^{4} + a^{2} + a b}\right ) + \frac {1}{2} \, \sqrt {-b} \arctan \left (\frac {\sqrt {b \tan \relax (x)^{4} + a} \sqrt {-b}}{b \tan \relax (x)^{2}}\right ) + \frac {1}{2} \, \sqrt {b \tan \relax (x)^{4} + a}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.42, size = 89, normalized size = 0.99 \[ \frac {{\left (a + b\right )} \arctan \left (-\frac {\sqrt {b} \tan \relax (x)^{2} - \sqrt {b \tan \relax (x)^{4} + a} + \sqrt {b}}{\sqrt {-a - b}}\right )}{\sqrt {-a - b}} + \frac {1}{2} \, \sqrt {b} \log \left ({\left | -\sqrt {b} \tan \relax (x)^{2} + \sqrt {b \tan \relax (x)^{4} + a} \right |}\right ) + \frac {1}{2} \, \sqrt {b \tan \relax (x)^{4} + a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 139, normalized size = 1.54 \[ \frac {\sqrt {\left (1+\tan ^{2}\relax (x )\right )^{2} b -2 \left (1+\tan ^{2}\relax (x )\right ) b +a +b}}{2}-\frac {\sqrt {b}\, \ln \left (\frac {\left (1+\tan ^{2}\relax (x )\right ) b -b}{\sqrt {b}}+\sqrt {\left (1+\tan ^{2}\relax (x )\right )^{2} b -2 \left (1+\tan ^{2}\relax (x )\right ) b +a +b}\right )}{2}-\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b -2 \left (1+\tan ^{2}\relax (x )\right ) b +2 \sqrt {a +b}\, \sqrt {\left (1+\tan ^{2}\relax (x )\right )^{2} b -2 \left (1+\tan ^{2}\relax (x )\right ) b +a +b}}{1+\tan ^{2}\relax (x )}\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \tan \relax (x)^{4} + a} \tan \relax (x)\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \mathrm {tan}\relax (x)\,\sqrt {b\,{\mathrm {tan}\relax (x)}^4+a} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a + b \tan ^{4}{\relax (x )}} \tan {\relax (x )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________